<?php
require_once 'Image/ThumbLib.inc.php';

class Core_Images 
{
	public $thl;
	public $file;
	
	public function __construct( $file ) {
		$this->thl = PhpThumbFactory::create( $file );
		$this->file = $file; 
	}
	
	public function thumb( $x, $y ) {
		$this->thl->resize( $x, $y )->save( preg_replace( '/\.(.*)/', '_' . $x . '.$1', $this->file ) );
	}

}
